FROM ros:foxy

RUN apt update

RUN rosdep fix-permissions

RUN . /opt/ros/foxy/setup.sh 
RUN rosdep update

RUN mkdir -p /root/ros_ws/src

WORKDIR /root/ros_ws/src

RUN git clone -b ros2 https://github.com/ros-drivers/velodyne/

WORKDIR /root/ros_ws/
RUN . /opt/ros/foxy/setup.sh && rosdep install --from-paths src --ignore-src -r -y
RUN . /opt/ros/foxy/setup.sh && colcon build --symlink-install

